package com.william.nacoswilliam.controller;

//import com.alibaba.nacos.api.annotation.NacosInjected;
//import com.alibaba.nacos.api.exception.NacosException;
//import com.alibaba.nacos.api.naming.NamingService;
//import com.alibaba.nacos.api.naming.pojo.Instance;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**spring boot 即可 nacos配置
 * @Describe
 * @Author: william_xhw
 * @Version 1.0
 */
@RestController
@RequestMapping("/discovery")
public class ServerListController {

//    @NacosInjected
//    private NamingService namingService;
//
//    @RequestMapping(value = "/get", method = RequestMethod.GET)
//    public List<Instance> get(@RequestParam String serviceName) throws NacosException {
//        return namingService.getAllInstances(serviceName);
//    }
//
//
//    @RequestMapping(value = "/registerInstance", method = RequestMethod.GET)
//    public void registerInstance(@RequestParam String serviceName) throws Exception {
//         namingService.registerInstance(serviceName , InetAddress.getLocalHost().getHostAddress(), 8080 );
//    }

}
